package com.jiwei.community.controller;

import com.jiwei.community.service.UploadService;
import com.jiwei.community.vo.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author 季伟
 * @date 2024/4/15
 */
@RestController
@RequestMapping("/upload")
public class UploadController {
    @Autowired
    UploadService uploadService;
    @PostMapping("/image")
    public ResponseResult uploadImage(MultipartFile file){
        return uploadService.uploadImage(file);
    }
}
